/**
 * This class defines the wormholes in this asteroids
 * game.  There will be two wormholes on the screen at all times
 * and whatever enters one leaves the other with its velocity
 * carried over.  
 */

package com.PortalAsteroidjava;

import com.badlogic.gdx.graphics.g2d.Sprite;
import com.badlogic.gdx.graphics.Texture;

public class Wormhole extends Sprite {
	
	//The size of the wormhole sprite
	public static final int SIZE = 20;
	
	//The time remaining until the wormholes
	//respawn at different locations
	public double respawnTime;
	
	/**
	 * The constructor for the wormholes.  
	 * They will be drawn at the given location
	 * with the given size, however, they will not
	 * have any velocity at any point in the game.
	 * NOTE: I'm still working out how the wormholes will
	 * work.  I think, in practice, we may need two wormhole
	 * classes and just have them send coordinates to each other
	 * so objects can enter one and leave the other.
	 */
	public Wormhole(float x, float y)
	{
		super(PortalAsteroidjava.wormholeTexture, SIZE, SIZE);
		this.setPosition(x, y);
		
		//The respawn time in seconds for the wormholes
		this.respawnTime = 10;
	}
	
	/**
	 * Updates this wormhole
	 */
	/*public void tick()
	{
		super.tick();
		
		//decrement the respawn timer
		this.respawnTime--;
	}*/
	
	/**
	 * Returns the respawn timer so the game
	 * loop knows when to destroy and relocate the 
	 * wormholes.
	 */
	/*public double getRespawnTime()
	{
		return this.respawnTime;
	}*/
}
